package com.foreverwin.jzymes.qc.check.service;

import com.foreverwin.jzymes.common.domain.NcData;
import com.foreverwin.jzymes.common.enums.TaskTypeEnum;
import com.foreverwin.jzymes.qc.check.domain.QcCheck;
import com.foreverwin.jzymes.qc.check.domain.QcCheckFaiFail;

import java.util.Date;
import java.util.List;
import java.util.Map;

public interface IQcCheckAdiviceService {

    /**
     * 提交目检、三次元检测结果
     *
     * @param qcCheck
     * @param ncList
     * @param qcFAIBo
     */
    public void  submit( String taskType, QcCheck qcCheck, List<NcData> ncList, String qcFAIBo );


    /**
     * 处理三次元数据
     *
     * @param faiId
     */
    public void processfaiData( String faiId );

    /**
     * 处理cnc上传抽检本体信息
     *
     * @param site
     * @param carrier
     * @param resource
     * @param taskId
     * @param sendTime
     */
    public void retrieveQcCheckCarrier( String site, String carrier, String resource, String taskId, Date sendTime );

    public List<QcCheckFaiFail> resolveFaiData(QcCheck qcCheck, Map<String,Object> faiData );

    /**
     * 构建FAI不合格明细
     *
     * @param site
     * @param carrier
     * @return
     */
    public List<Map<String,Object>> buildFaiNcDataList( String site, String carrier );

    /**
     * 查询打开状态qc任务
     *
     * @param site
     * @param taskTypeEnum
     * @param resource
     * @return
     */
    public List<QcCheck> findOpenQcCheck(String site, TaskTypeEnum taskTypeEnum, String resource );

    /**
     * 查询打开状态qc任务
     *
     * @param site
     * @param taskTypeEnum
     * @param carrier
     * @param resource
     * @return
     */
    public List<QcCheck> findOpenQcCheck( String site, TaskTypeEnum taskTypeEnum, String carrier, String resource );

    /**
     * 查询关闭状态qc任务
     *
     * @param site
     * @param taskTypeEnum
     * @param resource
     * @return
     */
    public List<QcCheck> findCloseQcCheck( String site, TaskTypeEnum taskTypeEnum, String resource );

    /**
     * 查询qc任务
     *
     * @param site
     * @param taskId
     * @return
     */
    public QcCheck findQcCheckTask( String site, String taskId );

    /**
     * 查询本体FAI测量数据
     *
     * @param site
     * @param carrier
     * @return
     */
    public Map<String,Object> findFaiDataByCarrier(String site, String carrier );

}
